package com.study.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the orderlogtype database table.
 * 
 */
@Entity
@NamedQuery(name="Orderlogtype.findAll", query="SELECT o FROM Orderlogtype o")
public class Orderlogtype implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="olt_id")
	private int oltId;

	@Column(name="olt_name")
	private String oltName;

	//bi-directional many-to-one association to Orderlog
	@OneToMany(mappedBy="orderlogtype")
	private List<Orderlog> orderlogs;

	public Orderlogtype() {
	}

	public int getOltId() {
		return this.oltId;
	}

	public void setOltId(int oltId) {
		this.oltId = oltId;
	}

	public String getOltName() {
		return this.oltName;
	}

	public void setOltName(String oltName) {
		this.oltName = oltName;
	}

	public List<Orderlog> getOrderlogs() {
		return this.orderlogs;
	}

	public void setOrderlogs(List<Orderlog> orderlogs) {
		this.orderlogs = orderlogs;
	}

	public Orderlog addOrderlog(Orderlog orderlog) {
		getOrderlogs().add(orderlog);
		orderlog.setOrderlogtype(this);

		return orderlog;
	}

	public Orderlog removeOrderlog(Orderlog orderlog) {
		getOrderlogs().remove(orderlog);
		orderlog.setOrderlogtype(null);

		return orderlog;
	}

}